package com.shujia.spark.stream

import java.sql.{Connection, DriverManager, PreparedStatement}

object Demo8JDBCExeception {
  def main(args: Array[String]): Unit = {

    var i = 0
    while (true) {
      Class.forName("com.mysql.jdbc.Driver")
      val con: Connection = DriverManager.getConnection("jdbc:mysql://master:3306/student", "root", "123456")
      val stat: PreparedStatement = con.prepareStatement("insert into card_flow_avg_speed(card,com_time,flow,avg_speed) values(?,?,?,?)")

      i += 1
      println(i)
    }
  }

}
